/**
 * 基础路由
 * @type { *[] }
 */

const constantRouterMap = [
  {
    path: "/",
    name: "首页入口",
    redirect: "/login",
  },
  {
    path: "/desktop",
    component: () => import("@/layouts/mainWin.vue"),
    children: [
      {
        path: "",
        name: "桌面",
        component: () => import("@/views/demo/desktop.vue"),
      },
      {
        path: "/icons",
        name: "图标演示页",
        component: () => import("@/views/demo/icons.vue"),
      },
      {
        path: "/html",
        name: "静态页",
        component: () => import("@/views/demo/html.vue"),
      }, 
      {
        path: "/database",
        name: "数据库操作",
        component: () => import("@/views/demo/database.vue"),
      },
      {
        path: "/windows",
        name: "窗口通信",
        component: () => import("@/views/demo/windows.vue"),
      },
      {
        path: "/state",
        name: "参数检测",
        component: () => import("@/views/demo/state.vue"),
      },
    ],
  },
  {
    path: "/setting",
    // 小弹窗布局模板
    component: () => import("@/layouts/tinyWin.vue"),    
    redirect: "/common",
    children: [
      {
        path: "/common",
        name: "通用设置",
        component: () => import("@/views/demo/setting.vue"),
      },
      {
        path: "/about",
        name: "关于软件",
        component: () => import("@/views/demo/about.vue"),
      },
      {
        path: "/subwindow",
        name: "通信子窗口",
        component: () => import("@/views/demo/subwindow.vue"),
      },
      {
        path: "/help",
        name: "帮助中心",
        component: () => import("@/views/demo/help.vue"),
      }
    ],
  },
  {
    path: "/login",

    children: [
      {
        path: "/login/mobile",
        name: "手机登录",
        component: () => import("@/views/login/LoginMobile.vue"),
      },{
        path: "/login/key",
        name: "密钥登录",
        component: () => import("@/views/login/LoginKey.vue"),
      },
      {
        path: "",
        name: "登录入口",
        component: () => import("@/views/login/Login.vue"),
      },
    ],
  },
  // 404页面配置
  {
    path: "/404",
    name: "404页面",
    component: () => import("@/views/demo/404.vue"),
  },
  {
    path: "/browserview",
    name: "browserview窗口",
    component: () => import("@/views/demo/browserview.vue"),
  },
  {
    path: "/webview",
    name: "webview窗口",
    component: () => import("@/views/demo/webview.vue"),
  },
];
export default constantRouterMap;
